/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.recherchemulticriteres.builder;

import fr.generali.accueilclient.opt.recherchemulticriteres.om.IMotifsRechMultiCriteres;
import fr.generali.accueilclient.opt.recherchemulticriteres.om.impl.DTOMotifsRechMultiCriteres;

/**
 * @author Holmes Kelly
 */
public class DTOMotifsRechMultiCriteresBuilder extends
                DTOMotifsRechMultiCriteresBuilderBase<DTOMotifsRechMultiCriteresBuilder> {

    /**
     * constructeur
     */
    public DTOMotifsRechMultiCriteresBuilder() {
        super(new DTOMotifsRechMultiCriteres());
    }

    /**
     * @return DTOMotifsRechMultiCriteresBuilder
     */
    public static DTOMotifsRechMultiCriteresBuilder dTOMotifsRechMultiCriteres() {
        return new DTOMotifsRechMultiCriteresBuilder();
    }

    /**
     * @return DTOMotifsRechMultiCriteres
     */
    public IMotifsRechMultiCriteres build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOMotifsRechMultiCriteresBuilderBase<GeneratorT extends DTOMotifsRechMultiCriteresBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private IMotifsRechMultiCriteres instance;

    /**
     * @param aInstance instance
     */
    protected DTOMotifsRechMultiCriteresBuilderBase(IMotifsRechMultiCriteres aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected IMotifsRechMultiCriteres getInstance() {
        return instance;
    }

    /**
     * @param aValue identifiant dossier
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiantDossier(String aValue) {
        instance.setIdentifiantDossier(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue identifiant motif
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiantMotif(String aValue) {
        instance.setIdentifiantMotif(aValue);

        return (GeneratorT ) this;
    }

    /**
     * @param aValue nom
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildNom(String aValue) {
        instance.setNom(aValue);

        return (GeneratorT ) this;
    }
}
